//
//  ViewController.m
//  UISlider
//
//  Created by clz on 2019/8/11.
//  Copyright © 2019年 clz. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property(nonatomic,strong)UISlider *slider;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // UISlider
    self.slider = [[UISlider alloc]init];
    self.slider.minimumTrackTintColor = [UIColor greenColor];
    self.slider.maximumTrackTintColor = [UIColor redColor];
    [self.slider setThumbImage:[UIImage imageNamed:@"椭圆5"] forState:UIControlStateNormal];
    
    [self.slider addTarget:self action:@selector(changeProgress:) forControlEvents:UIControlEventValueChanged];
    
    [self.view addSubview:self.slider];
    self.slider.frame = CGRectMake(100, 100, 200, 30);
   
}

- (void)changeProgress:(UISlider *)sender{
    NSLog(@"进度 = %f",sender.value);
}




@end
